﻿@* @model IEnumerable<Bai1.Models.RestaurantReview>

    
@{
    ViewBag.Title = "Index";
    var firstReview = Model.First();
}

@firstReview.Name

@section ABC{
    We are showing laster @Model.Count() reviews
}
<h2>Latest Reviews</h2>
We are showing laster @Model.Count() reviews
</br>
@VirtualPath
<p>
    @Html.ActionLink("Create New", "Create")
</p>
<table>
    <tr>
        <th>
            @Html.DisplayNameFor(model => model.Name)
        </th>
        <th>
             @Html.DisplayNameFor(model => model.City) 
            
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Country)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Rating)
        </th>
        <th></th>
    </tr>
    *@
@*
@foreach (var item in Model) {
    <tr>
        <td>
           @Html.DisplayFor(modelItem => item.Name)
        </td>
        <td>
             @Html.DisplayFor(modelItem => item.City) 
            @Html.Raw(item.City)
        </td>
        <td>
           @Html.DisplayFor(modelItem => item.Country) 
            
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Rating)
            R@(item.Rating)
            @@Bai1
        </td>
        <td>
            @Html.ActionLink("Edit", "Edit", new { id=item.Id }) |
            @Html.ActionLink("Details", "Details", new { id=item.Id }) |
            @Html.ActionLink("Delete", "Delete", new { id=item.Id })
        </td>
    </tr>
}

</table>
 Block
    @foreach (var item in Model)
    {
        <div class="review">
            <h4>@item.Name</h4>
            <span>@item.Rating</span>
            <p>@item.City, @item.Country</p>
            <span class="right"> @Html.ActionLink("Edit", "Edit", new {id = item.Id }) </span>
        </div>
    }

<b>Partial View:</b>
@foreach (var item in Model)
{
    @Html.Partial("_Review", item)
}
*@
